package AbstractTransaction

import (
	"fmt"
	"log"
	"salary_payment_case/Model"
)

type ChangeMethodTransaction struct {
	ChangeEmployeeTransaction
	MethodTransaction
}

type MethodTransaction interface {
	GetMethod() Model.PaymentMethod
}

func (ch *ChangeMethodTransaction) Change(employee *Model.Employee) {
	p := ch.GetMethod()
	employee.SetMethod(p)
}

func (ch *ChangeMethodTransaction) Pay(pc Model.Paycheck) {
	err := fmt.Errorf("The method or operation is not implemented.")
	log.Println(err.Error())
}
